<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Blued版本统计</title>

    <!-- Bootstrap Core CSS -->
    <link rel="shortcut icon" href="../../qa/static/images/shouye/QA-Logo.png">
    <link href="../../qa/static/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="../../qa/static/css/chart.css" rel="stylesheet">

    <!-- Morris Charts CSS -->
    <link href="../../qa/static/css/plugins/morris.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="../../qa/static/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
        <div id="page-wrapper">

            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-12">
                        <h4 class="page-header">选择版本</h4>
                    </div>
                </div>
                <div class="row">
                    <form method= 'get'>
{#                            <div style="float: left;">#}
                        <select name="version" class="form-control" style="width: auto;float: left; margin-left: 5%; margin-right: 5%">
                            <option value= 3 {% if  myversion  == '3' %}selected="selected"{% endif %}>国内版Android</option>
                            <option value= 4 {% if  myversion  == '4' %}selected="selected"{% endif %}>国内版IOS</option>
                            <option value= 13 {% if  myversion  == '13' %}selected="selected"{% endif %}>国际版Android</option>
                            <option value= 12 {% if  myversion  == '12' %}selected="selected"{% endif %}>国际版IOS</option>
                        </select>
                        <select name="build" class="form-control" style="width: auto;float: left;">
                        <option value="trunk">Trunk</option>
                            {% for x in  build  %}
                                <option value={{ x }} {% if  myselected  == x %}selected="selected"{% endif %}>{{ x }}</option>
                            {% endfor %}
                        </select>
                        <input type="submit" id='vbadge' class='btn btn-info' value='查询' style="width: auto;float: left;margin-left: 5%">
{#                            </div>#}
                    </form>
                </div>
                <div class="row">
                    <div class="col-lg-12">
                        <div class="row">
                            <div class="col-lg-12">
                                <h3 class="page-header">Blued收敛曲线</h3>
                            </div>
                        </div>
                        <div style="margin-top: 5%">
                            <div id="morris-line-chart">
                            </div>
                        </div>
                    </div>
                </div>

        </div>
        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->

    <!-- jQuery -->
    <script src="../../qa/static/js/jquery.js"></script>


    <!-- Morris Charts JavaScript -->
    <script src="../../qa/static/js/plugins/morris/raphael.min.js"></script>
    <script src="../../qa/static/js/plugins/morris/morris.min.js"></script>
    <script src="../../qa/static/js/plugins/morris/morris-data.js"></script>

    <!-- Flot Charts JavaScript -->
    <!--[if lte IE 8]><script src="js/excanvas.min.js"></script><![endif]-->
    <script>
        function submitForm(){
        //获取form表单对象
            var form = document.getElementById("build");
            form.submit();//form表单提交
        }
        $(function() {
            Morris.Line({
                element: 'morris-line-chart',
                data: [
                    {
                    d: '{{ date4 }}',
                    submit: {{ submit4 }},
                    fixed:{{ fixed4 }},
                    remain: {{ bydesign4 }}
                }, {
                    d: '{{ date3 }}',
                    submit: {{ submit3 }},
                    fixed:{{ fixed3 }},
                    remain:{{ bydesign3 }},
                }, {
                    d: '{{ date2 }}',
                    submit: {{ submit2 }},
                    fixed:{{ fixed2 }},
                    remain:{{ bydesign2 }},
                }, {
                    d: '{{ date1 }}',
                    submit: {{ submit1 }},
                    fixed:{{ fixed1 }},
                    remain:{{ bydesign1 }},
                }, {
                    d: '{{ date0 }}',
                    submit: {{ submit0 }},
                    fixed:{{ fixed0 }},
                    remain:{{ bydesign0 }},
                }
                ],
                // The name of the data record attribute that contains x-visitss.
                xkey: 'd',
                // A list of names of data record attributes that contain y-visitss.
                ykeys: ['submit', 'fixed', 'remain'],
                // Labels for the ykeys -- will be displayed when you hover over the
                // chart.
                labels: ['submit','fixed', 'remain'],
                // Disables line smoothing
                barRatio: 0.8,
                xLabelAngle: 35,
                smooth: false,
                resize: true
            });
        });

    </script>

</body>

</html>
